<template>
	<view>
		<view class="body after-navber">
			<view
				:class="(show_card ? 'no-scroll' : '') + ' ' + (show_shop || show_coupon_picker || show_card ? 'hidden' : '')"
				style="padding-bottom: 129rpx">
				<view class="block">
					<view @tap="goToAddress" class="address-picker flex-row" hoverClass="none">
						<view class="flex-grow-1" v-if="address">
							<view class="flex-row" style="margin-bottom: 20rpx">
								<view class="flex-grow-1">收货人：{{ address.name }}</view>
								<view class="flex-grow-1">{{ address.mobile }}</view>
							</view>
							<view style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis">
								收货地址：{{ address.province }}{{ address.city }}{{ address.district }}{{ address.addr }}{{ address.info }}
							</view>
						</view>
						<view class="flex-grow-1" v-else>
							<view style="color: #ff4544">请选择收货地址</view>
						</view>
						<view class="flex-grow-0 flex-y-center">
							<image src="/static/images/icon-jiantou-r.png"
								style="width: 12rpx; height: 22rpx; margin-left: 24rpx"></image>
						</view>
					</view>
					<view class="address-bg-img flex-row">
						<image src="/static/images/pt-addres-top.png"></image>
					</view>
				</view>
				<view @tap="showPayment" class="flex-row flex-y-center"
					style="background: #fff; padding: 0 24rpx; height: 90rpx; margin-bottom: 20rpx">
					<view class="flex-grow-1">支付方式</view>
					<view class="flex-grow-0" v-if="payment == 0">线上支付</view>
					<view class="flex-grow-0" v-if="payment == 3">{{money_name}}支付</view>
					<view class="flex-grow-0">
						<image src="/static/images/icon-jiantou-r.png"
							style="width: 12rpx; height: 22rpx; margin-left: 12rpx"></image>
					</view>
				</view>
				<view class="mch-item" v-for="(item, index) in mch_list" :key="item.id">
					<view class="mch-header">{{ item.store.name }}</view>

					<view class="cart-list">
						<view class="flex-col" v-if="item.show || i < 1" v-for="(cart, i) in item.list"
							:key="cart.id">
							<view class="cart-item border-bottom">
								<view class="flex-row">
									<view class="flex-grow-0">
										<image class="goods-pic" mode="aspectFill" :src="cart.image"></image>
									</view>
									<view class="flex-grow-1 flex-col">
										<view class="flex-grow-1">
											<view class="goods-name">{{ cart.name }}</view>
											<view class="attr-list">
												<view class="attr-item"
													v-if="cart.sku">
													{{ cart.sku.product_sku_text}}
												</view>
												<view class="attr-item"
													v-else>
													默认
												</view>
											</view>
											<view class="attr-list" v-if="cart.msg" style="color: #ff4544;">
												{{cart.msg}}
											</view>
										</view>
										<view class="flex-grow-0 flex-row">
											<view class="flex-grow-1 num">×{{ cart.number }}</view>
											<view class="flex-grow-0 price" >{{ type == 'score' ? cart.score+money_name :'￥'+ cart.price }}</view>
										</view>
									</view>
								</view>
						
							</view>

							<view class="goods-intrgral flex-row" v-if="cart.give_score > 0">
								<view class="flex-y-center">订单完成赠送</view>
								<view class="flex-y-center" style="color: #ff4544">{{ cart.give_score }}</view>
								<view class="flex-y-center">{{money_name}}</view>
							</view>
						</view>
						<view @tap="showMore" class="show-more flex-x-center" :data-index="index"
							v-if="item.list.length > 1">
							<view class="flex-row flex-y-center" v-if="item.show">
								<view class="flex-grow-0">点击收起</view>
								<image class="show-more-img flex-grow-0" src="/static/images/icon-shop-down.png"
									style="transform: rotate(180deg)"></image>
							</view>
							<view class="flex-row flex-y-center" v-else>
								<view class="flex-grow-0">
									展开另外
									<text style="color: #ff4544">{{ item.show_length }}</text>
								</view>
								<image class="show-more-img flex-grow-0" src="/static/images/icon-shop-down.png"></image>
							</view>
						</view>
					</view>

					<view style="margin-bottom: 20rpx">
						<block v-if="item.mch_id == 0">
							<view class="flex flex-row flex-y-center"
								style="background-color: #fff; padding: 0 24rpx; height: 104rpx"
								v-if="item.send_type == 0">
								<view class="flex-grow-1">配送方式</view>
								<view class="flex-grow-0 flex-row">
									<view @tap="getOffline"
										:class="'flex-y-center flex-x-center send-type ' + (item.offline == 0 ? 'active' : '')"
										:data-index="index" data-offline="0">
										<view>快递配送</view>
									</view>
									<view @tap="getOffline"
										:class="'flex-y-center flex-x-center send-type ' + (item.offline == 1 ? 'active' : '')"
										:data-index="index" data-offline="1">
										<view>到店自提</view>
									</view>
								</view>
							</view>
						</block>
						<view class="flex flex-row flex-y-center"
							style="background-color: #fff; padding: 0 24rpx; height: 104rpx" v-else>
							<view class="flex-grow-1">配送方式</view>
							<view class="flex-grow-0 flex-row">
								<view class="flex-y-center flex-x-center" :data-index="index" data-offline="0">
									<view>快递配送</view>
								</view>
							</view>
						</view>
					</view>

					<view style="margin-bottom: 20rpx" v-if="type != 'score'">
						<view @tap="showCouponPicker" class="flex-row flex-y-center border-bottom" :data-index="index"
							style="background: #fff; padding: 0 24rpx; height: 90rpx"
							v-if="item.coupon_list && item.coupon_list.length > 0">
							<view class="flex-grow-1">优惠券</view>
							<view class="flex-grow-0">
								<view style="color: #888" v-if="!item.coupon_list || item.coupon_list.length == 0">
									目前无可用优惠券</view>
								<block v-else>
									<view style="color: #ff4544"
										v-if="item.picker_coupon && item.picker_coupon.money > 0">
										-{{ item.picker_coupon.money }}元</view>
									<view style="color: #ff4544" v-else>有{{ item.coupon_list.length }}张优惠券可以使用</view>
								</block>
							</view>
							<view class="flex-grow-0">
								<image src="/static/images/icon-jiantou-r.png"
									style="width: 12rpx; height: 22rpx; margin-left: 12rpx"></image>
							</view>
						</view>
						<view class="flex-row flex-y-center border-bottom"
							style="background: #fff; padding: 0 24rpx; height: 90rpx"
							v-if="item.integral && item.integral.forehead_integral > 0 && integral && integral.forehead_integral > 0">
							<view class="flex-grow-1 flex-y-center">
								<view class="flex-y-center">使用{{ integral.forehead_integral }}{{money_name}}抵扣</view>
								<view class="flex-y-center" style="color: #ff4544">{{ integral.forehead }}</view>
								<view class="flex-y-center">元</view>
								<view @tap="integration" class="flex-y-center">
									<image :src="__wxapp_img.store.ntegration.url"
										style="width: 36rpx; height: 36rpx; margin-left: 12rpx"></image>
								</view>
							</view>
							<view class="flex-grow-0 flex-y-center integral-switch" :data-index="integral_radio">
								<switch checked @change="integralSwitchChange" class="flex-y-center"
									style="height: 44rpx"></switch>
							</view>
						</view>
					</view>

					<view class="flex-row flex-y-center border-bottom"
						style="background: #fff; padding: 0 24rpx; height: 90rpx; margin-bottom: 20rpx">
						<view class="flex-grow-1">运费</view>
						<view class="flex-grow-0">
							<block >
								<view style="color: #ff4544" v-if="address">{{'￥'+ item.delivery_price }}</view>
								<view @tap="goToAddress" style="color: #888" v-else>请先选择收货地址</view>
							</block>
						
						</view>
					</view>

					<view class="flex flex-row flex-y-center border-bottom"
						style="background: #fff; padding: 0 24rpx; height: 90rpx">
						<view class="flex-grow-0">买家留言</view>
						<view class="flex-grow-0" style="padding-left: 24rpx">
							<input @input="bindContentInput" :data-index="index" name="content" placeholder="请填写备注"
								style="width: 100%" :value="item.content" />
						</view>
					</view>


				</view>
			</view>
			<view class="coupon-picker" v-if="show_coupon_picker">
				<scroll-view class="coupon-list" :scrollY="true" style="height: 100%">
					<view style="color: #888; font-size: 9pt; margin-bottom: 20rpx; line-height: 1.35">
						注：优惠券只能抵消商品金额，不能抵消运费，商品金额最多优惠到0.01元</view>
					<view @tap="pickCoupon" class="flex-y-center flex-x-center" data-index="-1"
						style="height: 80rpx; margin-bottom: 24rpx; color: #888; border: 1rpx solid #e3e3e3; border-radius: 10rpx">
						不使用优惠券
					</view>
					<view @tap="pickCoupon"
						:class="'coupon-item coupon-status-' + item.status + ' ' + (picker_coupon && item.user_coupon_id == picker_coupon.user_coupon_id ? 'active' : '')"
						:data-index="index" v-for="(item, index) in coupon_list" :key="item.id">
						<image class="coupon-bg"
							:src="'/static/images/img-coupon-bg-' + (item.status == 0 ? 0 : 1) + '.png'">
						</image>

						<image class="coupon-status-icon"
							:src="'/static/images/img-coupon-status-icon-' + item.status + '.png'"
							v-if="item.status != 0">
						</image>

						<view class="flex-row" style="height: 100%; overflow: hidden">
							<view class="flex-grow-0 flex-col flex-y-center flex-x-center coupon-left">
								<view class="flex-row flex-y-bottom">
									<view style="font-size: 9pt">￥</view>
									<view
										:style="'font-size: ' + (item.money.length > 4 ? '13' : '19') + 'pt;line-height: .9'">
										{{ item.money }}
									</view>
								</view>
								<view style="font-size: 8pt; margin-top: 10rpx">满{{ item.man}}元可使用</view>
							</view>
							<view class="flex-grow-1 flex-y-center coupon-right">
								<view style="width: 100%">
									<view class="flex-row flex-y-center mb-10">
										<view class="flex-grow-1" style="font-size: 13pt; font-weight: bold">
											{{ item.content }}
										</view>
										<view class="flex-grow-0" style="font-size: 9pt"></view>
									</view>
									<view style="font-size: 8pt; color: #888">有效期 : {{ item.expires_time_text }}
									</view>
								</view>
							</view>
						</view>
					</view>
				</scroll-view>
			</view>
			<view class="payment flex-x-center flex-y-center" v-if="show_payment">
				<view class="payment-modal">
					<view class="pay-modal">
						<view class="pay-head flex-x-center flex-y-center">
							<view>支付方式</view>
							<view @tap="payClose" class="pay-x">
								<image src="/static/images/icon-close.png"></image>
							</view>
						</view>
						<view style="border-top: 1rpx solid #e3e3e3" v-if="pay_type_list.length > 0">
							<view @tap="payPicker" class="pay-block flex-row flex-y-center" :data-index="item.payment"
								v-for="(item, index) in pay_type_list" :key="item.id">
								<view class="flex-grow-0">
									<image :src="item.icon" style="width: 56rpx; height: 56rpx; margin-right: 32rpx">
									</image>
								</view>

								<view :class="'flex-grow-1 ' + (payment == item.payment ? 'red' : '')">{{ item.name }}
								</view>

								<view class="flex-grow-0" v-if="payment == item.payment">
									<image src="/static/images/icon-pay-right.png"
										style="width: 40rpx; height: 40rpx; margin-right: 18rpx"></image>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<cover-view class="bottom-bar flex-row">
				<cover-view class="flex-y-center flex-grow-1" style="padding: 0 24rpx">
					<cover-view class="flex-grow-1" style="color: #ff4544" v-if="type == 'mall'">总计：￥{{ new_total_price }}</cover-view>
					<cover-view class="flex-grow-1" style="color: #ff4544" v-if="type == 'score'">总计：{{ new_total_score }}{{money_name}} {{total_delivery_price > 0 ? '+￥'+total_delivery_price : ''}}</cover-view>
				</cover-view>
				<cover-view class="flex-y-center flex-grow-0 flex-x-center submit-btn" style="background-color: #ccc"
					v-if="offer_rule && offer_rule.is_allowed == 1">
					<cover-view style="white-space: normal">{{ offer_rule.msg }}</cover-view>
				</cover-view>
				<cover-view @tap="orderSubmit" class="flex-x-center flex-y-center flex-row submit-btn" v-else>
					<cover-view>提交</cover-view>
				</cover-view>
			</cover-view>

		</view>
	</view>
</template>

<script>
	import {Order} from '../../../apirequest/order-model.js';
	var o = new Order();
	import {Cart} from '../../../apirequest/cart-model.js';
	var c = new Cart();
	import {My} from '../../../apirequest/my-model.js';
	var m = new My();
	export default {
		data() {
			return {
				address: false,
				express_price: 0,
				index: -1,
				integral_radio: 1,
				new_total_price: 0,
				show_payment: false,
				show_more: false,
				mch_list: [],
				pay_type_list: [{
					icon: "https://duitou.abxxsj.com/web/statics/images/recharge/icon-online.png",
					name: '线上支付',
					payment: 1
				}, 
				// {
				// 	icon: "https://duitou.abxxsj.com/web/statics/images/recharge/icon-balance.png",
				// 	name: '账户余额支付',
				// 	payment: 3
				// },
				],
				payment: 0,
				show_coupon_picker: false,
				coupon_list: [],
				type:'mall',
				new_total_score:0,
				coupon_index:0,
				coupon_mch_index:0,
				check_coupon_ids:[],
				total_delivery_price:0,
				money_name:this.globalData.money_name,
			}
		},
		onLoad(options) {
			this.cart_ids = options.cart_ids
			if(options.type){
				this.type = options.type
				if(this.type == 'score'){
					this.pay_type_list = [
						{
								icon: "https://duitou.abxxsj.com/web/statics/images/recharge/icon-balance.png",
								name: this.globalData.money_name+'支付',
								payment: 3 
						},
					]
					this.payment = 3
				}
			}
			this._index();
		},
		onShow() {
			var that = this;
			var addr = this.address;
			if(addr){
				o.preview({cart_ids:this.cart_ids,addr_id:addr.id},(res) => {
					if(res.code == 1){
						that.mch_list = res.data.mch_list
						that.new_total_price = res.data.total_price
						that.new_total_score = res.data.total_score
						that.total_delivery_price = res.data.total_delivery_price 
						// that.address = res.data.address 
					}
				})
			}
		},

		methods: {
			_index(){
				var that = this;
				o.preview({cart_ids:this.cart_ids},(res) => {
					if(res.code == 1){
						that.mch_list = res.data.mch_list
						that.new_total_price = res.data.total_price
						that.new_total_score = res.data.total_score
						that.total_delivery_price = res.data.total_delivery_price 
						that.address = res.data.address
					}else{
						uni.showToast({
							title:res.msg,
							icon:'none'
						})
					}
				})
			},
			bindContentInput(e){
				
				var index = e.currentTarget.dataset.index;
				var mch_list = this.mch_list;
				this.mch_list[index].content = e.detail.value
			},
			showPayment: function() {
				this.show_payment = true
			},

			goToAddress: function() {
				uni.navigateTo({
					url: '/pages2/shop/address-list/address-list?cart_ids='+this.cart_ids
				});
			},

			payPicker: function(t) {
				var that = this
				var e = t.currentTarget.dataset.index
				that.payment = e
				that.show_payment = false
			},

			payClose: function() {
				this.show_payment = false
			},
			showCouponPicker: function(t) {
				var e = t.currentTarget.dataset.index;
				var a = this.mch_list;
				this.show_coupon_picker = true;
			
				var coupon_list =a[e].coupon_list
				coupon_list.forEach((e,i) => {
					if(this.check_coupon_ids.indexOf(e.id) !== -1){
						coupon_list[i].status = 1
					}else{
						coupon_list[i].status = 0
					}
				})
				this.coupon_list = coupon_list;
				this.coupon_mch_index = e
			
			},
			pickCoupon: function(t) {
				var e = t.currentTarget.dataset.index;
				var a = this.coupon_mch_index;
				var o = this.mch_list;
				if(e>-1){
					if(this.check_coupon_ids.indexOf(this.coupon_list[e].id) !== -1){
						uni.showToast({
							title:'已经选过该优惠券了',
							icon:'none'
						})
						return false;
					}
					this.check_coupon_ids.splice(a,1,0)
					this.check_coupon_ids.splice(a,1,this.coupon_list[e].id)
					o[a].picker_coupon = this.coupon_list[e]
					var money = this.coupon_list[e].money;
					var sub_total = o[a].sub_total;
					if(sub_total > money){
						this.new_total_price = (this.new_total_price - money).toFixed(2)
					}else{
						this.new_total_price = (this.new_total_price - sub_total + 0.01).toFixed(2)
					}
				}else{
					this.check_coupon_ids.splice(a,1,0)
					o[a].picker_coupon = false
					var new_total_price = 0;
					o.forEach((v,k) => {
						new_total_price += v.sub_total + v.delivery_price
						//console.log(v.picker_coupon)
						if(v.picker_coupon){
							if(v.sub_total > v.picker_coupon.money){
								new_total_price =new_total_price - v.picker_coupon.money
							}else{
								new_total_price =new_total_price -v.sub_total+0.01
							}
							
						}
					})
					this.new_total_price = new_total_price.toFixed(2);
				}
				this.show_coupon_picker = false;
				this.mch_list = o;
				this.coupon_mch_index = -1;
			},
		   showMore: function(t) {
				var e = this.mch_list;
				var  a = t.currentTarget.dataset.index;
				 e[a].show = !e[a].show;
				 this.mch_list= e
			       
			},
			orderSubmit(){
				var that = this;
				var addr_id = 0;
				if(!this.address){
					uni.showToast({
						title:'请选择收货地址',
						icon:'none'
					})
					return false;
				}
				var mch_list = this.mch_list;
				var coupon_ids = [];
				var content = [];
				for(var index in mch_list){
					content.push(mch_list[index].content)
					var cid = 0;
					if(mch_list[index].picker_coupon){
						cid = mch_list[index].picker_coupon.id
					}
					coupon_ids.push(cid)
				}
				var cart_ids = this.cart_ids;
				var type = this.type == 'score' ? 2 : 1;
				o.create({cart_ids:this.cart_ids,addr_id:this.address.id,content:content,pay_type:this.payment,type:type,coupon_ids:coupon_ids},(res) => {
					if(res.code == 1){
						if(res.data.type == 1){
							uni.requestPayment({
							    provider: 'wxpay', 
								timeStamp: res.data.data.timeStamp,
								nonceStr: res.data.data.nonceStr,
								package: res.data.data.package,
								signType: res.data.data.signType,
								paySign: res.data.data.paySign,
								success: function (res) {
									uni.showToast({
										title:'支付成功',
										icon:'none'
									})
									c.del_cart({ids:cart_ids},(res) => {
										
									})
									setTimeout(() => {
									if(type == 2){
										uni.redirectTo({
											url:"/pages2/integral-mall/order/order?status=1"
										})
									}else{
										uni.redirectTo({
											url:"/pages2/shop/order/order?status=1"
										})
									}
									},2000)
									
								},
								fail: function (err) {
									uni.showToast({
										title:'支付失败',
										icon:'none'
									})
								}
							});
						}else if(res.data.type == 2){
							uni.showToast({
								title:'支付成功',
								icon:'none'
							})
							c.del_cart({ids:cart_ids},(res) => {
								
							})
							setTimeout(() => {
								if(type == 2){
									uni.redirectTo({
										url:"/pages2/integral-mall/order/order?status=1"
									})
								}else{
									uni.redirectTo({
										url:"/pages2/shop/order/order?status=1"
									})
								}
								
							},800)
						}else if(res.data.type == 3){
							uni.showToast({
								title:'支付成功',
								icon:'none'
							})
							c.del_cart({ids:cart_ids},(res) => {
								
							})
							setTimeout(() => {
								uni.redirectTo({
									url:"/pages2/integral-mall/order/order?status=1"
								})
							},800)
						}
					}else{
						uni.showModal({
							title: '提示',
							content: res.msg,
							success: function (res) {
								if (res.confirm) {
									uni.navigateBack({
										delta:1
									})
								} else if (res.cancel) {
								
								}
							}
						});
					}
				})
			},

		}
	}
</script>

<style>
	.bottom-bar {
		position: fixed;
		bottom: 0;
		left: 0;
		height: 120rpx;
		background: #fff;
		border-top: 1rpx solid #e3e3e3;
		width: 100%;
		z-index: 1000;
	}

	.bottom-bar .submit-btn {
		background-color: #ff4544;
		color: #fff;
		width: 270rpx;
		text-align: center;
		margin: 0;
		padding: 0 20rpx;
		border-radius: 0;
		height: 100%;
	}

	.address-picker {
		background: #fff;
		padding: 34rpx 24rpx;
	}

	.cart-checkbox {
		display: inline-block;
		width: 40rpx;
		height: 40rpx;
		background-size: 100% 100%;
		background-image: url();
	}

	.cart-checkbox.active {
		background-image: url();
	}

	.cart-item {
		background: #fff;
		padding: 32rpx 24rpx 10rpx 24rpx;
	}

	.cart-item .goods-pic {
		width: 156rpx;
		height: 156rpx;
		margin-right: 20rpx;
	}

	.cart-item .goods-name {
		margin-bottom: 10rpx;
		-webkit-line-clamp: 2;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.cart-item .attr-list,
	.cart-item .num {
		font-size: 9pt;
		color: #888;
	}

	.cart-item .attr-list .attr-item {
		display: inline-block;
		margin-right: 36rpx;
	}

	.cart-item .attr-list .attr-item:last-child {
		margin-right: 0;
	}

	.cart-item .price {
		color: #ff4544;
	}

	.coupon-picker {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		z-index: 1001;
		background: #fff;
		border-top: 1rpx solid #e3e3e3;
	}

	.coupon-list {
		padding: 34rpx;
	}

	.coupon-list .coupon-item {
		height: 152rpx;
		width: 682rpx;
		position: relative;
		margin-bottom: 24rpx;
	}

	.coupon-list .coupon-item.coupon-status-1 .coupon-right,
	.coupon-list .coupon-item.coupon-status-2 .coupon-right {
		color: rgba(0, 0, 0, 0.35) !important;
	}

	.coupon-list .coupon-item .coupon-bg {
		width: 100%;
		height: 100%;
		position: absolute;
		top: 0;
		left: 0;
		z-index: -1;
	}

	.coupon-list .coupon-item .coupon-status-icon {
		width: 140rpx;
		height: 98rpx;
		position: absolute;
		top: 0;
		right: 8rpx;
		z-index: 1;
	}

	.coupon-list .coupon-item .coupon-left {
		color: #fff;
		width: 202rpx;
	}

	.coupon-list .coupon-item .coupon-right {
		padding: 20rpx 10rpx;
	}

	.shop-block {
		width: 100%;
		height: 70rpx;
		padding-left: 24rpx;
	}

	.shop-address {
		width: 100%;
		background-color: #fff;
		padding: 30rpx 24rpx;
	}

	.goods-intrgral {
		height: 60rpx;
		background-color: #fff7f6;
		width: 100%;
		border-bottom: 1rpx solid #e3e3e3;
		color: #919191;
		font-size: 9pt;
		padding: 0 24rpx;
	}

	.integral-switch .wx-switch-input {
		width: 42px;
		height: 22px;
	}

	.integral-switch .wx-switch-input::before {
		width: 41px;
		height: 20px;
	}

	.integral-switch .wx-switch-input::after {
		width: 20px;
		height: 20px;
	}

	.form-title {
		width: 100%;
		height: 72rpx;
		line-height: 72rpx;
		border-bottom: 1rpx #e3e3e3 solid;
		color: #707070;
	}

	.form-one {
		padding: 24rpx 0;
		border-bottom: 1rpx #e3e3e3 solid;
	}

	.form-one:last-child {
		margin: 0;
		border: 0;
	}

	.required::before {
		content: '*';
		color: #ff4544;
	}

	.form-one .list-name {
		width: 170rpx;
		justify-content: flex-end;
		text-align: right;
		margin-right: 20rpx;
	}

	.default {
		height: 56prx;
		padding: 12rpx 24rpx;
		margin-right: 20rpx;
		border-radius: 56rpx;
		border: 1rpx #ccc solid;
		color: #666;
		margin-bottom: 10rpx;
	}

	.default:last-child {
		margin-right: 0;
	}

	.d-active {
		background-color: #ff4544;
		color: #fff;
		border: 1rpx #ff4544 solid;
	}

	.right-jiantou {
		width: 12rpx;
		height: 22rpx;
		margin-left: 12rpx;
	}

	.payment {
		width: 100%;
		height: 100%;
		position: fixed;
		left: 0;
		bottom: 0;
		z-index: 9999;
		background-color: rgba(0, 0, 0, 0.5);
	}

	.payment-modal {
		position: relative;
		width: 100%;
		padding: 0 60rpx;
	}

	.pay-modal {
		width: 100%;
		background-color: #fff;
		border-radius: 16rpx;
	}

	.pay-head {
		height: 112rpx;
		width: 100%;
		color: #353535;
		position: relative;
	}

	.pay-x {
		position: absolute;
		right: 40rpx;
		top: 40rpx;
		width: 36rpx;
		height: 36rpx;
	}

	.pay-x image {
		width: 100%;
		height: 100%;
	}

	.pay-block {
		width: 100%;
		height: 120rpx;
		color: #999;
		padding: 0 30rpx;
	}

	.red {
		color: #ff4544;
	}

	.pay-footer {
		width: 100%;
		height: 88rpx;
		background-color: #ff4544;
		color: #fff;
	}

	.mch-header {
		background: #fff;
		padding: 24rpx;
		border-bottom: 1rpx solid #eee;
	}

	.border-bottom {
		position: relative;
	}

	.border-bottom:after {
		content: ' ';
		display: block;
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		height: 0;
		border-bottom: 1rpx solid #eee;
	}

	.mch-item {
		margin-bottom: 24rpx;
	}

	.is_area {
		background: #febd14;
		color: #fff;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 100%;
	}

	.check-icon {
		width: 38rpx;
		height: 38rpx;
		border: 4rpx solid #ccc;
		border-radius: 1000rpx;
		position: relative;
		margin-right: 4rpx;
	}

	.check-icon::after {
		position: absolute;
		content: ' ';
		display: block;
		width: 30rpx;
		height: 30rpx;
		top: 4rpx;
		left: 4rpx;
		background: #e3e3e3;
		border-radius: 1000rpx;
	}

	.send-type {
		width: 160rpx;
		border: 1rpx solid #3f3f3f;
		color: #3f3f3f;
		border-radius: 8rpx;
		margin-left: 20rpx;
		padding: 6rpx 0;
	}

	.send-type:first-child {
		margin-left: 0;
	}

	.send-type.active {
		border: 1rpx solid #ff4544;
		color: #ff4544;
	}

	.address-bg-img {
		width: 100%;
		height: 8rpx;
	}

	.address-bg-img image {
		width: 100%;
		height: 100%;
	}

	.block {
		border-top: 1rpx solid #e3e3e3;
		margin-bottom: 20rpx;
		background: #fff;
	}

	.show-more {
		height: 72rpx;
		color: #919191;
		background: #fff;
	}

	.show-more-img {
		width: 18rpx;
		height: 18rpx;
		margin-left: 16rpx;
	}

	.cart-list {
		margin-bottom: 20rpx;
	}
</style>
